#gallery .outer {
    width: 340px;
    overflow: hidden;
    position: relative;
    border: 0px solid red;
}

.inner_main {
    border: 1px solid grey;
    padding: 3px;
    margin: 2px;
    max-height: 332px;
    max-width: 332px;
}

.inner {
    float: left;

    border: 1px solid grey;
    padding: 3px;
    margin: 2px;
    
    max-width: 100px;
    max-height: 100px;
}
#gallery img {
    max-width: 88px;
    max-height: 88px;
    display: block;
    position: relative;
}